package com.ali.stock.controller;

import com.ali.stock.domain.CodesInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
/**
 * 测试类
 */
@RequestMapping("/api/test")
//@Api(description = "服务器向客户端推送消息接口", tags = "Test")
public class TestController {

    @Autowired
    private TestServiceImpl testServiceImpl;
    /**
     * 启动页面
     * @return
     */
    @GetMapping("/start")
    public String start(){
        return "index";
    }

    @PostMapping("/pushToWeb")
    public Object pushToWeb(@RequestBody CodesInfo codesInfo){
        testServiceImpl.printTime();
        return true;
    }

//    @ApiOperation(value = "服务器端向客户端推送消息", notes = "服务器端向客户端推送消息")
//    public ResponseBean<?> pushToWeb(@RequestBody @ApiParam(value = "回收人编码和医院编码", required = true) CodesInfo info){
//
//        testServiceImpl.printTime();
//        return new ResponseBean<>(200, "success", "123456");
//    }

}
